package cn.edu.sjtu.se.dslab.controller;

import java.util.List;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.edu.sjtu.se.dslab.project.Position;
import cn.edu.sjtu.se.dslab.service.IPositionService;

@Controller
@RequestMapping(value = "/position")
public class PositionController {
	private static final Logger logger = Logger.getLogger(PositionController.class);

	@Resource(name="positionService")
	IPositionService positionService;
	
	@RequestMapping(value = "/list", method = RequestMethod.GET)
	@ResponseBody
	public List<Position> getPositionList(){
		List<Position> positions = positionService.getPositionList();
		return positions;
	}

}